# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Container.V1.Model.ResourceManagerTags do
  @moduledoc """
  A map of resource manager tag keys and values to be attached to the nodes for managing Compute Engine firewalls using Network Firewall Policies. Tags must be according to specifications in https://cloud.google.com/vpc/docs/tags-firewalls-overview#specifications. A maximum of 5 tag key-value pairs can be specified. Existing tags will be replaced with new values.

  ## Attributes

  *   `tags` (*type:* `map()`, *default:* `nil`) - TagKeyValue must be in one of the following formats ([KEY]=[VALUE]) 1. `tagKeys/{tag_key_id}=tagValues/{tag_value_id}` 2. `{org_id}/{tag_key_name}={tag_value_name}` 3. `{project_id}/{tag_key_name}={tag_value_name}`
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :tags => map() | nil
        }

  field(:tags, type: :map)
end

defimpl Poison.Decoder, for: GoogleApi.Container.V1.Model.ResourceManagerTags do
  def decode(value, options) do
    GoogleApi.Container.V1.Model.ResourceManagerTags.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Container.V1.Model.ResourceManagerTags do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
